#include <assert.h>
#include "companyao_factory.h"
#include "companyao_stub4web.h"
#include "companyao_stub4app.h"
//#include "companyao.h"

using namespace erp::company::ao;

bool CCompanyAoFactory::s_CompanyAoInit = false;

ICompanyAo* CCompanyAoFactory::GetObject(enum ObjType_T obj_type)
{
    switch(obj_type)
    {
    case STUB4APP:
        return (new CCompanyAoStub4App);
/*适应container3
    case POCO:
    {
        if(!s_CompanyAoInit)
        {
            int iRetCode = CCompanyAo::Initialize();
            assert(iRetCode == 0);
            s_CompanyAoInit = true;
        }   	
        return (new CCompanyAo);
	}*/
    default:
        assert(0);
    };
    return NULL;
}

ICompanyAoAsyc* CCompanyAoFactory::GetAsycObject()
{
	return (new CCompanyAoStub4App);
}
